<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
	<title>学生管理</title>
	<div th:insert="common::head"></div>
</head>

<body class="">
<div class="wrapper ">
	<div th:insert="~{common::sidebar(active='students.html')}"></div>
	<div class="main-panel">
		<!-- Navbar导航栏 -->
		<nav th:replace="~{common::navbar}"></nav>
		<!--搜索栏-->
		<div class="panel-header">
			<form id="search_form" th:action="@{/admin/student/search}">
				<div class="header text-center">
					<h2 class="title">学生管理</h2>
					<div class="input-group no-border col-sm-4 offset-4">
						<input type="text" name="search" class="form-control" th:placeholder="${msg==null?'姓名或学号...':msg}">
						<span class="input-group-addon">
                            <i class="now-ui-icons ui-1_zoom-bold" onclick="$('#search_form').submit()"></i>
                        </span>
					</div>
					<p class="category">搜索学生记录,支持姓名模糊查询,学号精确查询。</p>
				</div>
			</form>
		</div>
		<div class="content">
			<div class="row">
				<div class="col-md-12">
					<div class="card">
						<div class="card-header">
							<h4 class="card-title">学生管理</h4>
						</div>
						<div class="card-body">
							<div class="table-responsive">
								<table class="table">
									<thead class="text-primary">
									<th>
										ID
									</th>
									<th>
										姓名
									</th>
									<th>
										身份证号
									</th>
									<th>
										性别
									</th>
									<th>
										学号
									</th>
									<th>
										年级
									</th>
									<th>
										专业
									</th>
									<th>
										班级
									</th>
									<th>操作</th>
									</thead>
									<tbody>
									<tr th:each="student,index:${studentlist}">
										<td th:text="${student.getInfoId()}"></td>
										<td th:text="${student.getName()}"></td>
										<td th:text="${student.getId()}"></td>
										<td th:text="${student.getGender()==0?'女':'男'}"></td>
										<td th:text="${student.getStuNum()}"></td>
										<td th:text="${student.getGrade()}"></td>
										<td th:text="${student.getMajor()}"></td>
										<td th:text="${(student.getStuClass())}"></td>
										<td>
											<a class="btn btn-sm btn-danger" th:href="@{/admin/deletestu/}+${student.getInfoId()}">删除</a>
										</td>
									</tr>
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--底部footer-->
		<footer th:replace="~{common::footer}"></footer>
	</div>
</div>
</body>

<!--通用footerJs-->
<script th:replace="~{common::footerJs}"></script>

</html>
